﻿using System.Collections.Generic;
using Kugar.Core.BaseStruct;
using Newtonsoft.Json.Linq;

namespace Kugar.Tool.DataSync.ClientPlugin
{
    /// <summary>
    /// 数据导入插件
    /// </summary>
    public interface IImporterPlugin
    {
        /// <summary>
        /// 导入操作
        /// </summary>
        /// <param name="optType">操作类型</param>
        /// <param name="dataTypeName">数据类型名称</param>
        /// <param name="data">同步的数据</param>
        /// <returns></returns>
        ResultReturn Import(string dataTypeName, JObject data);

        /// <summary>
        /// 当前插件能处理的数据类型
        /// </summary>
        bool CanHandleWith(string dataTypeName);

        void Close();
    }
}